//
//  ClientManager.h
//  Client
//
//  Created by jyh on 2018/7/25.
//  Copyright © 2018年 huig. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ClientManager;
@protocol ClientManagerDelegate <NSObject>

/**
 接收到信息调用

 @param client self
 @param data 信息体
 */
- (void)clientManager:(ClientManager *)client data:(NSData *)data;
@end
@interface ClientManager : NSObject

@property (nonatomic, weak) id<ClientManagerDelegate> delegate;

+ (instancetype)shareInstance;

/**
 连接服务器

 @param address ip
 @param post 端口
 @return 返回结果
 */
- (BOOL)connectServerAddress:(NSString *)address post:(NSInteger)post;

/**
 发送信息

 @param data 信息体
 */
- (void)sendMessage:(NSData *)data;

@end
